/**
 * API Service for Device Scan Tasks
 */
import apiClient from './axios';

/**
 * 启动一个设备发现扫描任务
 * @param {object} scanParams - 包含 ipRange, port, username, password
 * @returns {Promise<AxiosResponse<{ taskId: string }>>}
 */
export const startScan = (scanParams) => {
    return apiClient.post('/devices/scans', scanParams);
};

/**
 * 获取指定扫描任务的状态和进度
 * @param {string} taskId - 任务ID
 * @returns {Promise<AxiosResponse<any>>}
 */
export const getScanStatus = (taskId) => {
    return apiClient.get(`/devices/scans/${taskId}`);
};